home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
tcplusx.zip
/
EVENT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-24
|
3KB
|
139 lines
#ifndef _EVENT_H
#define _EVENT_H
//
// event.h - header file for class Event
// Author - Robin W. McKean
// Last Update - February 17,1991
// Copyright (C) 1991 All rights reserved
//
// This file remains the property of the author, Robin W. McKean. You are
// free to use and change it as you see fit. This module, nor its object
// code, may not however be included in any packaged software without the
// written consent of the author.
//
// Contents ----------------------------------------------------------------
//
// eventClass
// Event
//
// Description
//
// Defines the class Event. The purpose of this class is to provide
// a uniform method of passing input information to the program.
//
// End ---------------------------------------------------------------------
// Interface Dependencies ---------------------------------------------------
#ifndef _IOSTREAM_H
#include <iostream.h>
#endif
#ifndef _GEN_H
#include <gen.h>
#endif
#ifndef _USETYPES_H
#include <usetypes.h>
#endif
#ifndef _OBJECT_H
#include <object.h>
#endif
// End Interface Dependencies ------------------------------------------------
// Class //
class Event : public Object
{
public:
Event( void ) {}
Event( Event& );
~Event( void ) {}
virtual classType isA( ) const;
virtual char *nameOf() const;
virtual hashValueType hashValue( ) const;
virtual int isEqual( const Object& ) const;
virtual void printOn( ostream& ) const;
unsigned int type;
unsigned int typeCode;
unsigned int shiftState;
Point point;
Sector sector;
};
// Description --------------------------------------------------------------
//
// Defines the event class that will be used to pass information to
// objects in the library. In this way, mouse and keyboard events can
// be sent to objects in a uniform manner
//
// Constructor
//
// Event()
//
// Really serves no purpose, other than to initialize the event
//
// Event( Event& )
//
// Copy constructor, copies one event into another
//
// Destructor
//
// ~Event()
//
// Really serves no purpose, required by compiler
//
// Member Functions
//
// isA( )
//
// Returns character class type eventClass
//
// nameOf( )
//
// Returns a character representation of class, "Event"
//
// hashValue( )
//
// This event has no hash value, so it returns 0
//
// isEqual( const Object& )
//
// Determines if one event is equal to another
//
// printOn( ostream& )
//
// Prints the contents of the class in a logical fashion
//
// Inherited Members
//
// isSortable( ) inherited from Object
// isAssociation( ) inherited from Object
// operator new inherited from Object
// firstThat( ) inherited from Object
// lastThat( ) inherited from Object
//
// Member Variables
//
// type
//
// Type of the event
//
// typeCode
//
// Code for this event
//
// shiftState
//
// State of the shift keys, if applicable for this event
//
// End Description ----------------------------------------------------------
#endif // _EVENT_H //